//---------------------------------------------------------------------------
#include "INC\\canlib.h"
#include "INC\\linlib.h"
#include <mmsystem.h>
#include <Classes.hpp>
#include <Controls.hpp>
#include <Menus.hpp>
#include <StdCtrls.hpp>
//---------------------------------------------------------------------------
struct TWMCanLib
{
    Cardinal Msg;
    DWORD hnd;
    WORD event;
    WORD _pad;
    Longint Result;
};
typedef struct _canstruct                        /* struct of can message */
{
   unsigned int id;
   unsigned int dlc;
   unsigned char data[8];
}CanMessage;
struct MemoBuffer
{
    UINT memoBufferTotal;
    //UINT memoBufferIndex;
    AnsiString memoID[20];
    AnsiString memoBuffer[20];
}MemoBuffer1;
//---------------------------------------------------------------------------
UINT g_TIMEID;
bool flagDisplayFixxed = false;
int Handle1 = -1;
UINT counterTask10ms = 10;
UINT counterTask100ms = 10;
AnsiString memoLine;
char id1Slave;
char id2Slave;
char id3Slave;
char id4Slave;
char id5Slave;
char id6Slave;
//---------------------------------------------------------------------------
void CALLBACK taskList(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
void timerStart(unsigned int ms_time_val);
void task10ms(void);
void timerStart(unsigned int ms_time_val);
void timerEnd(void);
void task10ms(void);
void task100ms(void);
void messageTranceiver(TWMCanLib& Message);
void linUpdateMessage(void);
char linIdConvert(int linId);
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TGroupBox *GroupBox3;
        TMemo *Memo1;
        TEdit *Edit1;
        TEdit *Edit2;
        TEdit *Edit3;
        TEdit *Edit4;
        TEdit *Edit5;
        TEdit *Edit6;
        TEdit *Edit7;
        TEdit *Edit8;
        TEdit *Edit9;
        TEdit *Edit10;
        TLabel *Label1;
        TLabel *Label2;
        TLabel *Label3;
        TLabel *Label4;
        TLabel *Label5;
        TLabel *Label6;
        TLabel *Label7;
        TLabel *Label8;
        TLabel *Label9;
        TLabel *Label10;
        TEdit *Edit11;
        TEdit *Edit12;
        TEdit *Edit13;
        TEdit *Edit14;
        TEdit *Edit15;
        TEdit *Edit16;
        TEdit *Edit17;
        TEdit *Edit18;
        TEdit *Edit19;
        TEdit *Edit20;
        TEdit *Edit21;
        TEdit *Edit22;
        TEdit *Edit23;
        TEdit *Edit24;
        TEdit *Edit25;
        TEdit *Edit26;
        TEdit *Edit27;
        TEdit *Edit28;
        TEdit *Edit29;
        TEdit *Edit30;
        TCheckBox *CheckBox1;
        TCheckBox *CheckBox2;
        TCheckBox *CheckBox3;
        TGroupBox *GroupBox1;
        TGroupBox *GroupBox2;
        TComboBox *ComboBox1;
        TCheckBox *CheckBox4;
        TEdit *Edit31;
        TEdit *Edit32;
        TEdit *Edit33;
        TEdit *Edit34;
        TEdit *Edit35;
        TEdit *Edit36;
        TEdit *Edit37;
        TEdit *Edit38;
        TEdit *Edit39;
        TEdit *Edit40;
        TButton *Button1;
        TButton *Button2;
        TPopupMenu *PopupMenu1;
        TMenuItem *FixedPosition1;
        TMenuItem *ClearData1;
        TMenuItem *CopyToClipboard1;
        TMemo *Memo2;
        TLabel *Label11;
        TLabel *Label12;
        TLabel *Label13;
        TLabel *Label14;
        TLabel *Label15;
        TLabel *Label16;
        TLabel *Label17;
        TLabel *Label18;
        TLabel *Label19;
        TLabel *Label20;
        TLabel *Label21;
        TCheckBox *CheckBox7;
        TEdit *Edit62;
        TEdit *Edit63;
        TEdit *Edit64;
        TEdit *Edit65;
        TEdit *Edit66;
        TEdit *Edit67;
        TEdit *Edit68;
        TEdit *Edit69;
        TEdit *Edit70;
        TCheckBox *CheckBox8;
        TEdit *Edit71;
        TEdit *Edit72;
        TEdit *Edit73;
        TEdit *Edit74;
        TEdit *Edit75;
        TEdit *Edit76;
        TEdit *Edit77;
        TEdit *Edit78;
        TEdit *Edit79;
        TEdit *Edit80;
        TCheckBox *CheckBox9;
        TEdit *Edit81;
        TEdit *Edit82;
        TEdit *Edit83;
        TEdit *Edit84;
        TEdit *Edit85;
        TEdit *Edit86;
        TEdit *Edit87;
        TEdit *Edit88;
        TEdit *Edit89;
        TEdit *Edit90;
        TCheckBox *CheckBox10;
        TEdit *Edit91;
        TEdit *Edit92;
        TEdit *Edit93;
        TEdit *Edit94;
        TEdit *Edit95;
        TEdit *Edit96;
        TEdit *Edit97;
        TEdit *Edit98;               
        TEdit *Edit99;
        TEdit *Edit100;
        TCheckBox *CheckBox5;
        TEdit *Edit41;
        TEdit *Edit42;
        TEdit *Edit43;
        TEdit *Edit44;
        TEdit *Edit45;
        TEdit *Edit46;
        TEdit *Edit47;
        TEdit *Edit48;
        TEdit *Edit49;
        TEdit *Edit50;
        TCheckBox *CheckBox6;
        TEdit *Edit51;
        TEdit *Edit52;
        TEdit *Edit53;
        TEdit *Edit54;
        TEdit *Edit55;
        TEdit *Edit56;
        TEdit *Edit57;
        TEdit *Edit58;
        TEdit *Edit59;
        TEdit *Edit60;
        TCheckBox *CheckBox11;
        TEdit *Edit101;
        TEdit *Edit102;
        TEdit *Edit103;
        TEdit *Edit104;
        TEdit *Edit105;
        TEdit *Edit106;
        TEdit *Edit107;
        TEdit *Edit108;
        TEdit *Edit109;
        TEdit *Edit110;
        TCheckBox *CheckBox12;
        TEdit *Edit111;
        TEdit *Edit112;
        TEdit *Edit113;
        TEdit *Edit114;
        TEdit *Edit115;
        TEdit *Edit116;
        TEdit *Edit117;
        TEdit *Edit118;
        TEdit *Edit119;
        TEdit *Edit120;
        TEdit *Edit61;
        TEdit *Edit121;
        TEdit *Edit122;
        TEdit *Edit123;
        TEdit *Edit124;
        TEdit *Edit125;
        TEdit *Edit126;
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall Button2Click(TObject *Sender);
        void __fastcall FixedPosition1Click(TObject *Sender);
        void __fastcall ClearData1Click(TObject *Sender);
        void __fastcall CopyToClipboard1Click(TObject *Sender);
        void __fastcall Edit11Change(TObject *Sender);
        void __fastcall Edit21Change(TObject *Sender);
        void __fastcall Edit31Change(TObject *Sender);
        void __fastcall ChecBox1Click(TObject *Sender);
        void __fastcall CheckBox3Click(TObject *Sender);
        void __fastcall CheckBox4Click(TObject *Sender);
        void __fastcall CheckBox2Click(TObject *Sender);
        void __fastcall Edit1Change(TObject *Sender);
        void __fastcall CheckBox5Click(TObject *Sender);
        void __fastcall CheckBox6Click(TObject *Sender);
        void __fastcall Edit41Change(TObject *Sender);
        void __fastcall Edit51Change(TObject *Sender);
private:	// User declarations
        BEGIN_MESSAGE_MAP
            MESSAGE_HANDLER(WM__CANLIB/*17378*/, TWMCanLib, messageTranceiver); //WM_USER
        END_MESSAGE_MAP(TForm)        
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
//---------------------------------------------------------------------------
        void __fastcall memo1Display(CanMessage* messageTx, int flagRxTx);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
 